package org.trademarket.trader.domain;

import org.springframework.util.Assert;

public class Trade {
	private String product;
	private int amount;

	public Trade(String product, int amount) {
		Assert.hasText(product, "Procuct cannot be null");
		Assert.isTrue(amount > 0, "Amount must be higher than 0");
		this.product = product;
		this.amount = amount;
	}

	public String getProduct() {
		return product;
	}

	public int getAmount() {
		return amount;
	}

	@Override
	public String toString() {
		return "Trade [product=" + product + ", amount=" + amount + "]";
	}
}
